// 房间路由
const room = require('express').Router();

// 查询所有房间信息
room.get('/', require('./actions/room/find'));
// 根据房间号查询房间信息
room.get('/exist/:tag', require('./actions/room/findByTag'));
// 根据房间id查询房间信息
room.get('/:id', require('./actions/room/findById'));
// 创建房间
room.post('/', require('./actions/room/create'));
// 根据id删除房间信息
room.delete('/:id', require('./actions/room/findByIdAndDelete'));
// 根据id修改房间信息
room.put('/:id', require('./actions/room/findByIdAndUpdate'));

// 导出路由
module.exports = room;